package net.bwie.realtime.jtp.Rpfunction;

import net.bwie.realtime.jtp.bean.Order;
import org.apache.flink.api.common.functions.AggregateFunction;

/**
 * 简介说明:
 *
 * @author: LiLi
 * @date: 2025/05/28 10:35:33
 * @version: 1.0
 */
public class TopNHotAggregation implements AggregateFunction<Order, Long, Long> {
    @Override
    public Long createAccumulator() {
        return 0L;
    }

    @Override
    public Long add(Order value, Long accumulator) {
        return accumulator + 1;
    }

    @Override
    public Long getResult(Long accumulator) {
        return accumulator;
    }

    @Override
    public Long merge(Long a, Long b) {
        return a + b;
    }
}
